package com.ccrfid.rmc6.repository.business.patrol;

import com.ccrfid.rmc6.entity.business.patrol.PatrolGroupPersonnelEntity;
import org.springframework.data.repository.Repository;

import java.util.List;

public interface PatrolGroupPersonnelRepository extends Repository<PatrolGroupPersonnelEntity, Long> {
    //
    PatrolGroupPersonnelEntity getById(Long id);
    //
    PatrolGroupPersonnelEntity getByGroupIdAndPersonnelId(Long groupId, Long personnelId);
    //
    List<PatrolGroupPersonnelEntity> getAllByGroupId(Long gorupId);
    //
    List<PatrolGroupPersonnelEntity> getAllBy();
    //
    PatrolGroupPersonnelEntity save(PatrolGroupPersonnelEntity entity);
    //
    boolean existsByGroupId(Long groupId);
    //
    void deleteAllByGroupId(Long groupId);
    //
    void deleteByGroupIdAndPersonnelId(Long groupId, Long personnelId);
    //
    void delete(PatrolGroupPersonnelEntity entity);
}
